package p270jp.pxv.android.viewholder;

import android.view.View;
import android.widget.TextView;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import p014ae.View$OnClickListenerC0156s7;
import p165fo.C3114c;
import p270jp.pxv.android.R;
import p270jp.pxv.android.event.OpenRankingLogDialogEvent;
import p370ni.RankingCategory;

@Deprecated
/* renamed from: jp.pxv.android.viewholder.DeprecatedRankingSpinnerViewHolder */
/* loaded from: classes2.dex */
public class DeprecatedRankingSpinnerViewHolder extends BaseViewHolder {
    private TextView textView;

    /* renamed from: jp.pxv.android.viewholder.DeprecatedRankingSpinnerViewHolder$SpinnerItem */
    /* loaded from: classes2.dex */
    public static class SpinnerItem {
        private Date date;
        private RankingCategory rankingCategory;

        public SpinnerItem(RankingCategory cVar, Date date) {
            this.rankingCategory = cVar;
            this.date = date;
        }

        public Date getDate() {
            return this.date;
        }

        public RankingCategory getRankingCategory() {
            return this.rankingCategory;
        }
    }

    public DeprecatedRankingSpinnerViewHolder(View view) {
        super(view);
        this.textView = (TextView) view.findViewById(R.id.text_view);
    }

    /* renamed from: a */
    public static /* synthetic */ void m4451a(RankingCategory cVar, Date date, View view) {
        lambda$bind$0(cVar, date, view);
    }

    public static int getLayoutRes() {
        return R.layout.view_ranking_spinner_item;
    }

    public static /* synthetic */ void lambda$bind$0(RankingCategory cVar, Date date, View view) {
        C3114c.m6284b().m6280f(new OpenRankingLogDialogEvent(cVar, date));
    }

    @Override // p270jp.pxv.android.viewholder.BaseViewHolder
    public void bind(Object obj) {
        super.bind(obj);
        SpinnerItem spinnerItem = (SpinnerItem) obj;
        Date date = spinnerItem.getDate();
        RankingCategory rankingCategory = spinnerItem.getRankingCategory();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(this.itemView.getContext().getString(R.string.ranking_log_title_date), Locale.US);
        String string = this.itemView.getContext().getString(rankingCategory.f23753b);
        TextView textView = this.textView;
        textView.setText(simpleDateFormat.format(date) + this.itemView.getContext().getString(R.string.ranking_log_title_mode, string));
        this.itemView.setOnClickListener(new View$OnClickListenerC0156s7(rankingCategory, date, 7));
    }
}
